package com.lemon.cloud.admin.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import java.io.Serializable;

@Data
public class OrgDTO implements Serializable {
    private Long id;

    @Schema(description = "父级部门id")
    @NotNull(message = "父级部门不能为空")
    private Long parentId;

    @Schema(description = "部门名称",minLength = 1,maxLength = 10)
    @NotEmpty(message = "部门名称不能为空")
    @Length(min = 1,max = 100,message = "部门名称长度在1~100字符")
    private String name;

    @Schema(description = "排序")
    @NotNull(message = "排序不能为空")
    private Integer sortOrder;
}
